package com.itheima.practice;

import java.util.Scanner;

public class _01卖飞机票 {
    public static void main(String[] args) {
        int price,month,place;
        Scanner sc=new Scanner(System.in);
        System.out.println("输入机票原价：");
        price=sc.nextInt();
        System.out.println("输入月份：");
        month=sc.nextInt();
        System.out.println("输入 0=头等舱 或 1=经济舱");
        place=sc.nextInt();
        if(5<=month&&month<=10){
            if(place==0){
                System.out.println(price*0.9);
            } else if (place==1) {
                System.out.println(price*0.85);
            }
        }else{
            if(place==0){
                System.out.println(price*0.7);
            } else if (place==1) {
                System.out.println(price*0.65);
            }
        }
    }
}
